package com.lg.distributed.transaction.controller;

import com.lg.distributed.transaction.service.MqMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author by Mr. Li 2020/12/11 10:52
 */
@RestController
@Slf4j
@RequestMapping("/mq")
public class MqMessageController {
    @Autowired
    private MqMessageService mqMessageService;

    @GetMapping("send")
    public String send() {
        mqMessageService.send();
        return "ok";
    }

    @GetMapping("sendMq")
    public String sendMq() {
        mqMessageService.sendMq();
        return "ok";
    }
}
